package org.karelun.gef.helper;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.karelun.gef.Activator;

public final class ImageResource {
	
	public static final String ASSOCIATION="icons/association.gif"; //$NON-NLS-1$
	public static final String GENERALIZATION="icons/fanhua.gif"; //$NON-NLS-1$
	public static final String DEPENDENCY="icons/depend.gif"; //$NON-NLS-1$
	public static final String REALIZATION="icons/connection_s.gif"; //$NON-NLS-1$
	
	public static final String USERCASEMODEL="icons/usecase.gif"; //$NON-NLS-1$
	public static final String CONNECTION_D="icons/connection_d.gif"; //$NON-NLS-1$
	public static final String CONNECTION_S="icons/connection_s.gif"; //$NON-NLS-1$
	public static final String ACTOREMODEL="icons/actor.gif"; //$NON-NLS-1$
	public static final String CLASSMODEL="icons/class.gif"; //$NON-NLS-1$
	public static final String NEWCONNECTION="icons/combin.gif"; //$NON-NLS-1$
	public static final String ARROWCONNECTION="icons/arrawConnection.gif"; //$NON-NLS-1$
	
	public static final String CLASS_ATTRIBUTE="icons/attribute_obj.gif"; //$NON-NLS-1$
	public static final String CLASS_METHOD="icons/method_obj.gif"; //$NON-NLS-1$
	
	public static final String STATE="icons/root.gif"; //$NON-NLS-1$
	public static final String STATESTAR="icons/start.gif"; //$NON-NLS-1$
	public static final String STATECHOICE="icons/StateChoice.gif"; //$NON-NLS-1$
	public static final String STATEEND="icons/end.gif"; //$NON-NLS-1$
	
	public static final String PACKAGE="icons/package.gif"; //$NON-NLS-1$
	public static final String INTERFACE="icons/interface.gif"; //$NON-NLS-1$
	public static final String RELATION="icons/relation.gif"; //$NON-NLS-1$
	
	public static final String NEW_CLASSDIAGRAM_ACTION="icons/new.gif"; //$NON-NLS-1$
	public static final String NEW_USERCASE_ACTION="icons/actor.gif"; //$NON-NLS-1$
	public static final String NEW_STATEDIAGRAM_ACTION="icons/start.gif"; //$NON-NLS-1$
	
	public static final String SAVE="icons/save.gif"; //$NON-NLS-1$
	public static final String OPEN="icons/open.gif"; //$NON-NLS-1$
	public static final String REFRESH="icons/refresh.gif"; //$NON-NLS-1$
	
	public static final String GRID="icons/grid.gif"; //$NON-NLS-1$
	
	public static final String EXPORT_IMAGE="icons/export_img.gif"; //$NON-NLS-1$
	
	public static final String COPY="icons/copy.gif"; //$NON-NLS-1$
	public static final String CUT="icons/cut.gif"; //$NON-NLS-1$
	public static final String PASTE="icons/paste.gif"; //$NON-NLS-1$
	
//	public static final String NEW_UML_EDITOR="icons/new.gif"; //$NON-NLS-1$
	
	public static final String PROP_CONSTRAINT="icons/property.gif"; //$NON-NLS-1$
	public static final String PROP_NAME="icons/name.gif"; //$NON-NLS-1$
	
	public static final String CLASS="icons/class_obj.gif"; //$NON-NLS-1$
	public static final String ATTRIBUTE="icons/attribute_obj.gif"; //$NON-NLS-1$
	public static final String METHOD="icons/method_obj.gif"; //$NON-NLS-1$
	public static final String AQ_IMAGE="icons/aq.jpg"; //$NON-NLS-1$
	
	public static final String IMAGETOOL="icons/image.gif"; //$NON-NLS-1$
	
	public static Image getImage(String path){
		ImageDescriptor imageDesc = getImageDesc(path);
		if(imageDesc!=null)
			return imageDesc.createImage(false);
		return null;
	}
	
	public static ImageDescriptor getImageDesc(String path){
		return AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, path);
	}
	
}
